﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SocketLib.Buffers
{
	public interface IBuffer: IDataReader, IDataWriter
	{
		int Position { get; set; }
		int Limit { get; set; }
		int Capacity { get; set; }
		void Flip();
		void Rewind();
		void Clear();
		void Reset();
		void Free();
		long Remaining { get; }
		byte[] toAllBytes();
		byte[] copyAvaliableBytes();
		bool AutoExtend { get; set; }
		void Append(byte[] p, int start, int length);
	}
}
